import request from '@/utils/request'

export const roles = (data: any) =>
  request({
    url: '/sys/roles',
    method: 'get',
    data
  })

  export const saveRole = (data: any) =>
  request({
    url: '/sys/role',
    method: 'post',
    data
  })

  export const roleById = (params: any) =>
  request({
    url: '/sys/role-id',
    method: 'get',
    params
  })

  //destoryById

  export const destoryById = (params: any) =>
  request({
    url: '/sys/destory-id',
    method: 'get',
    params
  })